package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HmzCollectionLevelMapper;
import com.ruoyi.system.domain.HmzCollectionLevel;
import com.ruoyi.system.service.IHmzCollectionLevelService;

/**
 * 藏品级别Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-25
 */
@Service
public class HmzCollectionLevelServiceImpl implements IHmzCollectionLevelService 
{
    @Autowired
    private HmzCollectionLevelMapper hmzCollectionLevelMapper;

    /**
     * 查询藏品级别
     * 
     * @param id 藏品级别主键
     * @return 藏品级别
     */
    @Override
    public HmzCollectionLevel selectHmzCollectionLevelById(Long id)
    {
        return hmzCollectionLevelMapper.selectHmzCollectionLevelById(id);
    }

    /**
     * 查询藏品级别列表
     * 
     * @param hmzCollectionLevel 藏品级别
     * @return 藏品级别
     */
    @Override
    public List<HmzCollectionLevel> selectHmzCollectionLevelList(HmzCollectionLevel hmzCollectionLevel)
    {
        return hmzCollectionLevelMapper.selectHmzCollectionLevelList(hmzCollectionLevel);
    }

    /**
     * 新增藏品级别
     * 
     * @param hmzCollectionLevel 藏品级别
     * @return 结果
     */
    @Override
    public int insertHmzCollectionLevel(HmzCollectionLevel hmzCollectionLevel)
    {
        hmzCollectionLevel.setCreateTime(DateUtils.getNowDate());
        return hmzCollectionLevelMapper.insertHmzCollectionLevel(hmzCollectionLevel);
    }

    /**
     * 修改藏品级别
     * 
     * @param hmzCollectionLevel 藏品级别
     * @return 结果
     */
    @Override
    public int updateHmzCollectionLevel(HmzCollectionLevel hmzCollectionLevel)
    {
        hmzCollectionLevel.setUpdateTime(DateUtils.getNowDate());
        return hmzCollectionLevelMapper.updateHmzCollectionLevel(hmzCollectionLevel);
    }

    /**
     * 批量删除藏品级别
     * 
     * @param ids 需要删除的藏品级别主键
     * @return 结果
     */
    @Override
    public int deleteHmzCollectionLevelByIds(Long[] ids)
    {
        return hmzCollectionLevelMapper.deleteHmzCollectionLevelByIds(ids);
    }

    /**
     * 删除藏品级别信息
     * 
     * @param id 藏品级别主键
     * @return 结果
     */
    @Override
    public int deleteHmzCollectionLevelById(Long id)
    {
        return hmzCollectionLevelMapper.deleteHmzCollectionLevelById(id);
    }
}
